import logging,yagmail
def Log2():
    logging.basicConfig(level=logging.DEBUG,
                            format='%(levelname)s %(message)s %(filename)s %(asctime)s %(lineno)d ',
                             filename='A3mall.log',
                             filemode='a+')

def email(file):
    email=yagmail.SMTP(user='2084779289@qq.com',password='eiqcbxzjpkofdcbd',host='smtp.qq.com')
    email.send(to='2084779289@qq.com',subject='测试结果',contents='测试结果',attachments=file)
    email.close()
